﻿
Partial Class photoalbums_addAlbum
    Inherits System.Web.UI.Page

    Protected Sub btnAddAlbum_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAddAlbum.Click
        Dim albumAdapter As New MainDbTableAdapters.AlbumsTableAdapter()
        Dim title As String
        Dim description As String
        Dim UserID As Integer
        Dim isPrivate As Boolean
        Dim albumID As Integer

        title = txtTitle.Text
        description = txtDesc.Text
        UserID = Request.Cookies("UserID").Value
        isPrivate = chkPrivate.Checked

        albumID = albumAdapter.AddAlbum(UserID, 0, title, description, isPrivate)

        Response.Redirect("editAlbum.aspx?albumID=" & albumID)


    End Sub
End Class
